<%@ page import="registerallocator.Sala" %>



<div class="fieldcontain ${hasErrors(bean: salaInstance, field: 'cursos', 'error')} ">
	<label for="cursos">
		<g:message code="sala.cursos.label" default="Cursos" />
		
	</label>
	
</div>

<div class="fieldcontain ${hasErrors(bean: salaInstance, field: 'horario', 'error')} ">
	<label for="horario">
		<g:message code="sala.horario.label" default="Horario" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${salaInstance?.horario?}" var="h">
    <li><g:link controller="horarioSala" action="show" id="${h.id}">${h?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="horarioSala" action="create" params="['sala.id': salaInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'horarioSala.label', default: 'HorarioSala')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: salaInstance, field: 'numero', 'error')} required">
	<label for="numero">
		<g:message code="sala.numero.label" default="Numero" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="numero" required="" value="${fieldValue(bean: salaInstance, field: 'numero')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: salaInstance, field: 'salas', 'error')} ">
	<label for="salas">
		<g:message code="sala.salas.label" default="Salas" />
		
	</label>
	<g:select name="salas" from="${registerallocator.Sala.list()}" multiple="multiple" optionKey="id" size="5" value="${salaInstance?.salas*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: salaInstance, field: 'turmas', 'error')} ">
	<label for="turmas">
		<g:message code="sala.turmas.label" default="Turmas" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${salaInstance?.turmas?}" var="t">
    <li><g:link controller="turma" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="turma" action="create" params="['sala.id': salaInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'turma.label', default: 'Turma')])}</g:link>
</li>
</ul>

</div>

